package com.le.tester.controller;

import com.le.tester.dto.EmployeeDto;
import com.le.tester.sevice.EmployeeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 描述：员工controller
 */
@Controller
@RequestMapping("/employee/")
public class EmployeeController {
    private static final Logger LOG = LoggerFactory.getLogger(EmployeeController.class);


    @Autowired
    public EmployeeService employeeService;

    @ResponseBody
    @RequestMapping(value = "save")
    public String saveEmp(@RequestBody EmployeeDto employeeDto) {
        return employeeService.join(employeeDto);

    }
}
